package com.atwisdom.star.common.enums;

/**
 * 节点是否还在WorkCenter中的状态枚举
 */
public enum WorkCenterInnerStatusEnum {
        INNER("1", "在容器中"),
        OCCUPIED("2", "被工单占用"),
        OUTER("3", "已移出");

        private String code;
        private String description;

        WorkCenterInnerStatusEnum(String code, String description) {
            this.code = code;
            this.description = description;
        }

    public static WorkCenterInnerStatusEnum getByCode(String code) {
        WorkCenterInnerStatusEnum[] values = WorkCenterInnerStatusEnum.values();
        for (WorkCenterInnerStatusEnum value : values) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

}